<%@page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>修改密码</title>
<%@ include file="/common/header/meta.jsp"%>
<%@ include file="/common/header/script.jsp"%>
<script type="text/javascript">
//提交表单数据
var submitNow = function() {
	var data = $("#form").form("getData") ;
	data["id"] = base.user_id ;
	$.post(base.contextPath+"/sysmgr/user/doNotNeedAuth_modifyPwd.do", data, function(result) {
		if (result.status) {
			$.easyui.loaded();alertify.success(result.msg);
		} else {
			$.easyui.loaded();$.messager.alert("错误", result.msg, "error");
		}
	}, 'json');
};

//验证表单
var submitForm = function() { 
	if($('#form').form('validate')) {
		$.easyui.loading({ msg: "数据提交中，请稍等..." });
		submitNow() ;
	}
};
</script>
</head>

<body>
	<div style="width:500px;height:100%;margin:0 auto;">
		<form id="form" class="easyui-form form_container" style="">
			<table class="tableform">
				<tr>
					<th>旧密码：</th>
					<td><input name="oldPwd" class="easyui-validatebox" type="password" data-options="prompt: '旧密码'" /></td>
				</tr>
				<tr>
					<th>新密码：</th>
					<td><input id="password" name="password" class="easyui-validatebox" type="password" data-options="required:true, prompt: '新密码'" /></td>
				</tr>
				<tr>
					<th>确认密码：</th>
					<td><input validType="equals[$('#password').val()]" invalidMessage="两次输入密码不匹配" class="easyui-validatebox" type="password" data-options="required:true, prompt: '确认密码'" /></td>
				</tr>
				<tr>
					<td colspan="2" align="center" style="height:50px;">
						<a onClick="submitForm();" class="easyui-linkbutton" data-options="plain: false, iconCls: 'ext_save'">修改密码</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>